def isNum(a):
    try:
         b= type(eval(a))
         if b==int  or b==float  or b==complex:
             return True
         else:
             return False
    except:
         return False  
a = input('请输入随机一个字符串：')
print(isNum(a))    

     
  

    
    
    

